home *** CD-ROM | disk | FTP | other *** search
/ Sun Solutions 1997 April to September / Sun Solutions CD - APR '97 - SEP '97 (704-3778-12 Rev. H)(Sun Microsystems, Inc.)(1997).iso / products / .wais / Solaris_2 / Mi.pm < prev    next >
Text File  |  1995-12-11  |  2KB  |  82 lines

  1. package Mi;
  2.  
  3. require Exporter;
  4. require AutoLoader;
  5. require DynaLoader;
  6. @ISA = qw(Exporter AutoLoader DynaLoader);
  7. # Items to export into callers namespace by default
  8. # (move infrequently used names to @EXPORT_OK below)
  9. @EXPORT = qw(
  10.     MI_ALERTER_DROPPED
  11.     MI_ALERTER_FIRED
  12.     MI_ALLOCATED_RESULT
  13.     MI_ARRAY_VALUE
  14.     MI_COPY_INPUT
  15.     MI_COPY_OUTPUT
  16.     MI_DDL
  17.     MI_DML
  18.     MI_ERROR
  19.     MI_EXCEPTION
  20.     MI_FATAL
  21.     MI_FUNCTION_RESULTS
  22.     MI_INTERNAL_REP_RESULT
  23.     MI_LARGE_OBJECT_VALUE
  24.     MI_LIB_BADARG
  25.     MI_LIB_BADSERV
  26.     MI_LIB_DROPCONN
  27.     MI_LIB_INTERR
  28.     MI_LIB_NOIMP
  29.     MI_LIB_USAGE
  30.     MI_MAX_FUNC_ARGS
  31.     MI_MESSAGE
  32.     MI_NORMAL_VALUE
  33.     MI_NOTICE
  34.     MI_NO_MORE_RESULTS
  35.     MI_NO_RESULT
  36.     MI_NULL_RESULT
  37.     MI_NULL_VALUE
  38.     MI_N_CALLBACK_EVENTS
  39.     MI_PORTAL_VALUE
  40.     MI_QUERY_BINARY
  41.     MI_QUERY_NORMAL
  42.     MI_ROWS
  43.     MI_ROW_VALUE
  44.     MI_SQL
  45.     MI_USE_DEFAULT_PORT
  46.     MI_WARN
  47. );
  48. # Other items we are prepared to export if requested
  49. @EXPORT_OK = qw(
  50. );
  51.  
  52. sub AUTOLOAD {
  53.     if (@_ > 1) {
  54.     $AutoLoader::AUTOLOAD = $AUTOLOAD;
  55.     goto &AutoLoader::AUTOLOAD;
  56.     }
  57.     local($constname);
  58.     ($constname = $AUTOLOAD) =~ s/.*:://;
  59.     $val = constant($constname, @_ ? $_[0] : 0);
  60.     if ($! != 0) {
  61.     if ($! =~ /Invalid/) {
  62.         $AutoLoader::AUTOLOAD = $AUTOLOAD;
  63.         goto &AutoLoader::AUTOLOAD;
  64.     }
  65.     else {
  66.         ($pack,$file,$line) = caller;
  67.         die "Your vendor has not defined Mi macro $constname, used at $file line $line.
  68. ";
  69.     }
  70.     }
  71.     eval "sub $AUTOLOAD { $val }";
  72.     goto &$AUTOLOAD;
  73. }
  74.  
  75. bootstrap Mi;
  76.  
  77. # Preloaded methods go here.  Autoload methods go after __END__, and are
  78. # processed by the autosplit program.
  79.  
  80. 1;
  81. __END__
  82.